#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	int n, grade, x = 0, y = 0, z = 0;
	scanf("%d", &n);

	for (int i = 0; i < n; i++)
	{
		scanf("%d", &grade);

		if (grade < 60)
			x++;
		else if (grade >= 60 && grade < 85)
			y++;
		else
			z++;
	}

	printf("%d %d %d", z, y, x);
	return 0;
}